Attribute VB_Name = "modRecyleFile"
Private Type SHFILEOPSTRUCT
        hWnd As Long
        wFunc As Long
        pFrom As String
        pTo As String
        fFlags As Integer
        fAnyOperationsAborted As Long
        hNameMappings As Long
        lpszProgressTitle As Long
End Type

Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Const FO_DELETE = &H3
Private Const FOF_ALLOWUNDO = &H40

Public Sub RecyleFile(ByVal strFile As String)
    Dim SHop As SHFILEOPSTRUCT
    
    With SHop
        .wFunc = FO_DELETE
        .pFrom = strFile + Chr(0)
        .fFlags = FOF_ALLOWUNDO
    End With
    
    SHFileOperation SHop
End Sub

Public Sub RecyleFiles(ByRef strFiles() As String)
    Dim SHop As SHFILEOPSTRUCT
    Dim i As Integer
    
    With SHop
        .wFunc = FO_DELETE
        For i = 0 To UBound(strFiles)
            .pFrom = .pFrom & strFiles(i) & Chr(0)
        Next
            
        .fFlags = FOF_ALLOWUNDO
        Debug.Print .pFrom
    End With
    
    SHFileOperation SHop
End Sub
